<?php
/* SVN FILE: $Id$ */
/* MgDocumento Test cases generated on: 2009-06-17 23:06:09 : 1245299649*/
App::import('Model', 'MgDocumento');

class MgDocumentoTestCase extends CakeTestCase {
	var $MgDocumento = null;
	var $fixtures = array('app.mg_documento', 'app.mg_agente', 'app.tc_movimientos_diario');

	function startTest() {
		$this->MgDocumento =& ClassRegistry::init('MgDocumento');
	}

	function testMgDocumentoInstance() {
		$this->assertTrue(is_a($this->MgDocumento, 'MgDocumento'));
	}

	function testMgDocumentoFind() {
		$this->MgDocumento->recursive = -1;
		$results = $this->MgDocumento->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('MgDocumento' => array(
			'id'  => 1,
			'codigo_referencia'  => 1,
			'mg_agente_id'  => 1,
			'cantidad_facturas'  => 1,
			'valor'  => 1,
			'created'  => '2009-06-17',
			'modified'  => '2009-06-17',
			'adicionado_por'  => 'Lorem ipsum dolor ',
			'modificado_por'  => 'Lorem ipsum dolor '
			));
			$this->assertEqual($results, $expected);
	}
}
?>